package com.openbravo.pos.panels.link.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;

import com.openbravo.bean.erp.viewbean.CustomerStockCurrentInfo;
import com.openbravo.format.Formats;
import com.openbravo.pos.base.AppLocal;


public class CustomerStoreVTableModel extends
		AbstractDTOTableModel<CustomerStockCurrentInfo> {


    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
    	CustomerStockCurrentInfo value=getObj(rowIndex);
       switch(columnIndex){
           case 0:
    	       return value.getTaxid();
           case 1:
        	   return value.getSearchkey();
           case 2:
        	   return value.getName();
           case 4:
               return value.getM_Location();
           case 5:
               return value.getAttrsetInsDesc();  
           case 6:
               return  value.getM_unit();
           case 7:
        	   return Formats.TIMESTAMP.formatValue(value.getValidityDate());
           case 8:
        	   return Formats.TIMESTAMP.formatValue(value.getCreateDate());

       }
       return null;
    }

	@Override
	public String[] getColumnNames() {
		return new String[]{
				AppLocal.getIntString("label.taxid"),
				AppLocal.getIntString("label.searchkey"),
				AppLocal.getIntString("label.name"),
	            AppLocal.getIntString("label.warehouse"),
	            AppLocal.getIntString("label.attribute"),
	            AppLocal.getIntString("label.storeNum"),
	            AppLocal.getIntString("label.validityDate"),
	            AppLocal.getIntString("label.item"),
	            AppLocal.getIntString("label.createTime")
	          };
	}
}